<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var obj = {
            say: function() {
                return this;
            },
        };
        console.log(obj.say()); //obj中的say方法中的函数指向obj
        // 2.对象是不能产生作用域的，say方法指向了window
        var obj1 = {
            say: () => {
                return this;
            },
        };
        console.log(obj1.say()); //obj中的say方法中的函数指向obj
    </script>
</body>

</html>